package com.ticketbooking.entity;

import javax.persistence.*;

@Entity
@Table(name = "manager",schema = "ticketbooking")
public class ManagerEntity {
    private String manname;
    private String manpassword;
    private String manpermission;

    @Id
    @Column(name = "manname")
    public String getManname() {
        return manname;
    }

    public void setManname(String manname) {
        this.manname = manname;
    }

    @Basic
    @Column(name = "manpassword")
    public String getManpassword() {
        return manpassword;
    }

    public void setManpassword(String manpassword) {
        this.manpassword = manpassword;
    }

    @Basic
    @Column(name = "manpermission")
    public String getManpermission() {
        return manpermission;
    }

    public void setManpermission(String manpermission) {
        this.manpermission = manpermission;
    }

    @Override
    public boolean equals(Object o){
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ManagerEntity that = new ManagerEntity();
        return (manname != null ? manname.equals(that.getManname()) : that.getManname() == null) &&
                (manpassword != null ? manpassword.equals(that.getManpassword()) : that.getManpassword() == null)&&
                (manpermission != null ? manpermission.equals(that.getManpermission()) : that.getManpermission() == null);
    }
}
